import ForAuth from "./for-auth";
import { Plus } from "lucide-react";
import Link from "next/link";
import { cn } from "@/lib/utils";

export default function RightPostAdd({ className }: { className?: string }) {
  return (
    <ForAuth when="authed">
      <Link
        href="/posts/create"
        className={cn(
          className,
          "relative rounded-full p-1 hover:text-white focus:outline-none focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-gray-800",
        )}
      >
        <span className="absolute -inset-1.5" />
        <span className="sr-only">View notifications</span>
        <Plus className="h-6 w-6" aria-hidden="true" />
      </Link>
    </ForAuth>
  );
}
